#!/usr/bin/env node
const http = require('http');
let html = '<html><head><meta charset="UTF-8"></head><body><h1>zhangxingjie</h1></body></html>'
http.createServer((req,res)=>{
  if(req.url = '/'){
  res.setHeader('Content-Type','text/html');
  res.setHeader('Content-Length',`${Buffer.from(html)}`)
   res.end(html);
  }
  else{
        res.statusCode = 404;
            res.end('ok!')
    
  }

}).listen(3000);
